<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Carbon;


class ServerAuth extends Model
{

    protected $table ='authorize_xiaohuai';

    public function user(){
        return $this->belongsTo('App\Models\User','user_id','id');
    }

    public function serverEngine(){
        return $this->belongsTo('App\Models\ServerEngine','server_engine_id','id');
    }

    public function getNameAttribute($value)
    {
        return is_null($value) ? 'xiaohuai' : $value;
    }
}
